/**
 * @Author: Sagan
 * @Date: 2020/09/19 18:30
 */
package module

import (
	"gitee.com/big_meteor/godash/validate/constant"
	"gitee.com/big_meteor/godash/validate/function"
)

// 不在某个区间（开区间）
// 支持的类型：int、uint、float
func NotBetween(v interface{}, start, end float64) (bool, error) {
	value, flag := function.ToFloat64(v)
	if false == flag {
		return false, constant.ERROR_NOT_BETWEEN_UDT
	}

	return value < start || value > end, nil
}
